
int MoreThanHalfNum_Solution(vector<int>& numbers)
{
    int len = numbers.size();
    map<int, int> m;
    int res = 0;
    for (int i = 0; i < len; i++)
    {
        m[numbers[i]]++;
        if (m[numbers[i]] > len / 2)
        {
            res = numbers[i];
            break;
        }
    }
    return res;
}